Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Revert "[stable30] fix: Handle copy of folders containing live photos"" #49840

Open
wants to merge 2 commits into
base: stable30
Choose a base branch
from

Conversation

artonge
Copy link
Contributor

@artonge artonge commented Dec 13, 2024

return $this->fileView->copy($sourcePath, $destinationPath);
$copyOkay = $this->fileView->copy($sourcePath, $destinationPath);

if (!$copyOkay) {

Check notice

Code scanning / Psalm

RiskyTruthyFalsyComparison Note

Operand of type bool|mixed contains type mixed, which can be falsy and truthy. This can cause possibly unexpected behavior. Use strict comparison instead.
if ($peerFileId === null) {
return;
}
$peerFile = $this->userFolder->getFirstNodeById($peerFileId);

Check notice

Code scanning / Psalm

PossiblyNullReference Note

Cannot call method getFirstNodeById on possibly null value
if ($event instanceof BeforeNodeCopiedEvent) {
$this->runMoveOrCopyChecks($sourceNode, $targetNode, $peerFile);
} elseif ($event instanceof NodeCopiedEvent) {
$this->handleCopy($sourceNode, $targetNode, $peerFile);

Check notice

Code scanning / Psalm

ArgumentTypeCoercion Note

Argument 3 of OCA\Files\Listener\SyncLivePhotosListener::handleCopy expects OCP\Files\File, but parent type OCP\Files\Node provided
Copy link

@teogarbarino teogarbarino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried with an empty folder and a folder containing photos. All the photos were successfully downloaded and are downloadable.

@artonge artonge force-pushed the revert-49825-revert-49650-backport/49293/stable30 branch from 7e9e4ba to 4f931b7 Compare January 27, 2025 10:45
@artonge artonge force-pushed the revert-49825-revert-49650-backport/49293/stable30 branch from 4f931b7 to 84b8d87 Compare February 6, 2025 17:40
@artonge artonge force-pushed the revert-49825-revert-49650-backport/49293/stable30 branch from 84b8d87 to 95135a3 Compare February 10, 2025 16:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants